<?php
namespace app\api\validate;

use think\Validate;

class GoodsValidate extends Validate{
    protected $rule =   [
        'id'                       => 'require|number',
        'user_id|用户ID'           => 'require|number',
        'goods_id|商品ID'          => 'require|number',
        'admin_id|店铺ID'          => 'require|number',
        'cate_id|分类ID'           => 'require|number',
        'curr|页数'                => 'require|number',
        'limit|条数'               => 'require|number',
        'number|数量'              => 'require|number',
        'type|商品类型'            => 'require|number',
        'ids|商品ID'               => 'require',
    ];
    
    protected $scene = [
        'list'        => ['cate_id', 'admin_id', 'curr', 'limit', 'type'],
        'show'        => ['goods_id'],
        'pointList'   => ['admin_id', 'curr', 'limit'],
        'pay_goods'   => ['ids'],
    ];
}